//
//  SlideSwitchView.h
//  SlideView
//
//  Created by zhaojh on 5/7/14.
//  Copyright (c) 2014年 zjh. All rights reserved.
//

#import <UIKit/UIKit.h>

@class SlideSwitchView;
@protocol SlideSwitchViewDataSource <NSObject>

//顶部的tab个数
- (NSUInteger)numberOfTabs;
- (UIViewController *)slideSwitchViewOfTab:(NSUInteger)number;

@optional
//下拉菜单的items
- (NSArray *)pullDownItemsAtIndex:(NSInteger)index;

@end

@protocol SlideSwitchViewDelegate <NSObject>

@optional
//滑动到左边界传递手势
- (void)slideSwitchView:(SlideSwitchView *)view panLeftEdge:(UIPanGestureRecognizer*) panParam;

//滑动右边界时传递手势
- (void)slideSwitchView:(SlideSwitchView *)view panRightEdge:(UIPanGestureRecognizer*)panParam;

//点击tab或者非边界滑动
- (void)slideSwitchView:(SlideSwitchView *)view didSelectTab:(NSUInteger)number;

//下拉菜单选中按钮后的回调
- (void)selectPullDownButton:(NSInteger)index;

@end

@interface TopScrollView : UIScrollView

@end

@interface SlideSwitchView : UIView <UIScrollViewDelegate>

@property (nonatomic, weak) id <SlideSwitchViewDataSource> dataSource;
@property (nonatomic, weak) id <SlideSwitchViewDelegate> delegate;

@property (nonatomic) BOOL isShowPullView;

//主视图的子视图数组
@property (nonatomic, strong) NSMutableArray *viewArray;

@property (nonatomic, strong) UIScrollView  *rootScrollView;
@property (nonatomic, strong) TopScrollView *topScrollView;

@property (nonatomic, strong) UIColor *tabItemNormalColor;
@property (nonatomic, strong) UIColor *tabItemSelectedColor;

//选中tab的背景阴影图片
@property (nonatomic, strong) UIImage *shadowImage;

@property (nonatomic, strong) UIButton *rightButton;



@end
